package com.tjetc.controller;

import com.tjetc.entity.Major;
import com.tjetc.service.IMajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;


@RestController
@RequestMapping("/major")
public class MajorController {
    @Autowired
    private IMajorService majorService;


    @RequestMapping("/getAll")
    public List<Major> getAll(){
        List<Major> list = majorService.list();
        return list;

    }

}
